package cn.tedu.mall1.order.controller;

import cn.tedu.mall1.base.response.JsonResult;
import cn.tedu.mall1.order.pojo.vo.OrderDetailsVO;
import cn.tedu.mall1.order.service.OrderDetailsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/v1/orderDetails")
public class OrderDetailsController {
    @Autowired
    private OrderDetailsService orderDetails;

    @GetMapping("/select")
    private JsonResult selectOrder(Integer orderNumber){
        OrderDetailsVO vo = orderDetails.select(orderNumber);
        return JsonResult.ok(vo);
    }
}
